/**
 * @properties={typeid:35,uuid:"86D6BD42-13BC-4B68-99F6-A6DEE47DBB53"}
 */
var fConcepto = null;

/**
 * @properties={typeid:35,uuid:"6177ED57-A95C-4A1D-8933-CBB87CE70DBB",variableType:4}
 */
var fEstado = null;

/**
 * @properties={typeid:35,uuid:"18583655-4F7B-42D6-A38F-06842DCB32E2",variableType:93}
 */
var fFechaDesde = null;

/**
 * @properties={typeid:35,uuid:"2655CA7C-E660-45C5-95E1-12A59A656B18",variableType:93}
 */
var fFechaHasta = null;

/**
 * @properties={typeid:35,uuid:"078FDFD9-BD14-4816-B5BC-F0496E28595D",variableType:4}
 */
var fSubdiarioId = null;

/**
 * @properties={typeid:35,uuid:"03EB04A2-1A35-4D91-B272-5EF18730041F",variableType:4}
 */
var fTipoId = null;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"8AC15957-7179-451B-9BBA-71D56EB7B0FB"}
 */
function ira_asiento_cab(event) {
	//forms.asientos_cab.controller.show()
	globals.mostrarForm('subdiarios_cab')
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"82ED6AB7-5CEC-42AF-869A-E43197C148EF"}
 */
function buscar(event) {
	
	if (elements.concepto1.readOnly = 0)
	{
		controller.find()
		
		var d1 = fFechaDesde
		var d2 = fFechaHasta
		if ((fFechaDesde != null) && (fFechaHasta != null))
		{
			d1.setHours(00);
			d1.setMinutes(00);
			d1.setSeconds(00);
			var df1 = utils.dateFormat(d1, 'dd-MM-yyyy hh:mm:ss')
		
			d2.setHours(23);
			d2.setMinutes(59);
			d2.setSeconds(59);
			var df2 = utils.dateFormat(d2, 'dd-MM-yyyy hh:mm:ss')
		}
		
		fecha 				= d1 + '...' + d2
		concepto 			= fConcepto
		subdiario_id 		= fSubdiarioId
		tipo_id 			= fTipoId 
		marca_consolidado 	= fEstado
		
		controller.search()
	}
	else
	{
		elements.concepto1.readOnly	 		 = 0 
		elements.fFechaDesde.readOnly 		 = 0 
		elements.fFechaHasta.readOnly 		 = 0 
		elements.tipo_id1.readOnly 			 = 0 
		elements.subdiario_id.readOnly 		 = 0 
	}
}
